package nc.ui.am.common;

import nc.ui.ml.NCLangRes;
import nc.vo.am.common.util.ExceptionUtils;
import nc.vo.pub.BusinessException;

public class I18N {

	private I18N() {
	}

	public static String get(String productCode, String resId) {
		
		return NCLangRes.getInstance().getStrByID(productCode, resId);
	}

	public static String get(String productCode, String resId, String[] argValues) {
		
		return NCLangRes.getInstance().getStrByID(productCode, resId, null, argValues);
	}

	public static void throwException(String productCode, String resId) throws BusinessException {
		ExceptionUtils.asBusinessException(get(productCode, resId));
	}

	public static void throwException(String productCode, String resId, String[] argValues) throws BusinessException {
		ExceptionUtils.asBusinessException(get(productCode, resId, argValues));
	}
}
